package com.zx.mes.hyl.common.msg;

import java.io.Serializable;

/**
 * 非集合信息返回
 * @author hyl
 * @date 2017-12-16
 */
public class ObjectRestResponse<T> extends BaseResponse implements Serializable{
    private T data;
    private boolean rel;

    public ObjectRestResponse(){}


    public ObjectRestResponse rel(boolean rel) {
        this.setRel(rel);
        return this;
    }

    public ObjectRestResponse data(T data) {
        this.setData(data);
        return this;
    }

    public ObjectRestResponse(T data, boolean rel) {
        this.data = data;
        this.rel = rel;
    }

    public ObjectRestResponse(Integer status, String message, T data, boolean rel) {
        super(status, message);
        this.data = data;
        this.rel = rel;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isRel() {
        return rel;
    }

    public void setRel(boolean rel) {
        this.rel = rel;
    }
}
